<%--
 *  File:    BusiAreaInfo.jsp
 *  @Author: Langerwang 
 *  Date:    2001/12/14
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.BusinessAreaInfo");  
  String privilegeCode = "10109,L104";
  String strModuleName = "OGM";  
%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>

<html>
<head>
<title>BusiAreaInfo</title>
<PageFlow:CheckPageFlow pageName="busiareainfo"/>
<%
  HashMap areaInfo = (HashMap)pageContext.getAttribute("areainfo");
  if(areaInfo == null)
  {
    areaInfo = new HashMap();
  }    
  String contextPath = request.getContextPath();
  Integer grade=(Integer)areaInfo.get("grade");
  String strIsBottom = "";
  strIsBottom = (String)areaInfo.get("isbottom");     
%>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script type="text/javascript">
function getcityforbottom()
{
     if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('MapCityInfo.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&areaid=<%=JspHelper.filterNull( areaInfo.get("areaid") )%>&grade='+<%=JspHelper.filterNull( areaInfo.get("grade") ) %>,'newwindow', 'height=500, width=700,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');

}

function ProView()
{
     if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('MapInfo.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&areaid=<%=JspHelper.filterNull( areaInfo.get("areaid") )%>','newwindow', 'height=500, width=700,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');

}
function getlowercity()
{
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open("TempBussinessareaInfoview.jsp?<%= OvalTools.randomURL() %>&parentareaid=<%=JspHelper.filterNull( areaInfo.get("areaid") )%>&isview=1","newwindow", "height=500, width=700,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");

}
</script>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
</head>

<body>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
  <form name="busiareaeditform" method="post" action="../../Dispatcher" target="_parent">

  <tr> 
    <td> 
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr> 
          <td colspan="2" class="summary_top"></td>
        </tr>
        <tr> 
          <td colspan="2"><img src="../../images/<%= strLanguageCode %>/quote.gif" width="16" height="11"> 
            <%= label.getLabelName("L_BusinessAreaInfo") + label.getLabelName("L_Colon") %></td>
        </tr>
      </table>
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
      <% if(grade.intValue() != 1){%>
       <tr>
				<td class="td-text"><%= label.getLabelName("L_ProductGroup") + label.getLabelName("L_Colon") %></td>
				<td><a onclick="ProView();"><custom:button type="3"
					label="L_Asterisk" imgsrc="flash.gif" border="0" /></a></td>
	  </tr>
	  <%}else{ %>
	  		<tr>
				<td class="td-text"><%= label.getLabelName("L_ProductGroup") + label.getLabelName("L_Colon") %></td>
				<td>&nbsp;</td>
			</tr>
			<%} %>
        <tr> 
          <td class="td-text"><%= label.getLabelName("L_AreaCode") + label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<oval:write name="areainfo" property="areacode"/></td>
        </tr>
        <tr> 
          <td class="td-text"><%= label.getLabelName("L_AreaName") + label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<oval:write name="areainfo" property="areaname"/></td>
        </tr>
        <tr> 
          <td class="td-text"><%= label.getLabelName("L_Department") + label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<oval:write name="areainfo" property="deptname"/></td>
        </tr>
		<tr> 
          <!--  <td class="td-text" height="13"><%= label.getLabelName("L_WhetherRetail") + label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<oval:write name="areainfo" property="valuename"/>
          	<custom:hidden name="areainfo" property="isretail"></custom:hidden>
          </td>-->
          <td class="td-text" height="13"><%= label.getLabelName("L_IsKeynote") + label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<oval:write name="areainfo" property="valuename"/>
          	<custom:hidden name="areainfo" property="isretail"></custom:hidden>
          </td>
        </tr>
        <!--  
        <tr id="area" style="display:none">
        	<td class="td-text"><%= label.getLabelName("L_SmallArea") + label.getLabelName("L_Colon") %></td>
        	<td>&nbsp;<custom:write  name="areainfo" property="smallarea" dictType="SmallArea" nbsp="true"/></td>      
        </tr>
        -->
        <tr> 
          <td class="td-text"><%= label.getLabelName("L_BusinessAreaDesc") + label.getLabelName("L_Colon") %> </td>
          <td>&nbsp;<oval:write name="areainfo" property="areadesc"/></td>
        </tr>
        <tr> 
          <td class="td-text" height="13"><%= label.getLabelName("L_ParentArea") + label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<oval:write name="areainfo" property="parentareaname"/></td>
        </tr>
        <!--  
        <tr>
			<td class="td-text" width="140"><%= label.getLabelName("L_City_Region") + label.getLabelName("L_Colon") %></td>
			<td>&nbsp;<custom:selectdic name="areainfo" property="iscityregion"
					dictType="YesOrNo" valueCriteria="1,2" defaultValue="----" disabled="true"/></td>
		</tr>
		-->
      	<tr>
			 <td class="td-text" height="13" width="140"><%= label.getLabelName("L_AreaType") + label.getLabelName("L_Colon") %></td>
			 <td>&nbsp;<custom:selectdic dictType="ZYLAreaType" name="areainfo" property="areatype" style="border:0" defaultValue="------"  disabled="true" style="width:100px"/></td>
		</tr>
		<!-- 
		<tr id="area">
			<td class="td-text" width="140"><%= label.getLabelName("L_Provicetdr") + label.getLabelName("L_Colon") %></td>
			<td><!--<custom:selectdic name="areainfo" property="stdareatype"
					dictType="ZYLAreaType" label="L_Actua_Business" />
			&nbsp;<custom:select name="areainfo"  property="stdareatype" optionInnerTextKey="areaname" optionsName="stdaretypeinfo" optionValueKey="stdareatype" defaultValue="----------" style="width:100px" defaultValueCost=" " disabled="true"/>	
			</td>
		</tr>
		-->
		<tr id="area">
			<td class="td-text" width="140"><%= label.getLabelName("L_Provicetdr") + label.getLabelName("L_Colon") %></td>
			<td><!--<custom:selectdic name="areainfo" property="stdareatype"
					dictType="ZYLAreaType" label="L_Actua_Business" />-->
			&nbsp;<oval:write name="areainfo" property="strareaname"/></td>
			</td>
		</tr>
		<tr>
				<td class="td-text" width="130"><%= label.getLabelName("L_CoveringCity") + label.getLabelName("L_Colon") %></td>
				<td><a onclick="getcityforbottom();"><custom:button type="3"
					label="L_Asterisk" imgsrc="flash.gif" border="0" /></a></td>
		</tr>
	    <%
        	if(strIsBottom.equals("Y")){
            %>
       	<tr>
				<td class="td-text" width="140"><%= label.getLabelName("L_Junior_City") + label.getLabelName("L_Colon") %></td>
				<td><a onclick="getlowercity();"><custom:button type="3"
					label="L_Asterisk" imgsrc="flash.gif" border="0" /></a>
			    </td>
		</tr>
	   <%
       	}%>
      </table>
    </td>
  </tr>
  <tr> 
    <td class="summary_top"></td>
  </tr>
  <tr> 
    <td class="td_center"><a onclick="self.location.href='Blank.jsp?<%= OvalTools.randomURL() %>';"><custom:button type="1" label="L_Back" imgsrc="back.gif" border="0" style="width:60"/></a></td>
  </tr>
  </form>
</table>
</body>
<script type="text/javascript">
/*var isHidden;
if(document.busiareaeditform.areatype.value != -1){
	document.getElementById("area").style.display = "block";
}*/
</script>
</html>


